import 'element-plus/packages/theme-chalk/src/base.scss'
import { themeSize } from '@/config'
import {
  ElScrollbar,
  ElContainer,
  ElAside,
  ElHeader,
  ElMain,
  ElFooter,
  ElRow,
  ElCol,
  ElForm,
  ElFormItem,
  ElInput,
  ElButton,
  ElRadio,
  ElRadioGroup,
  ElMenu,
  ElSubmenu,
  ElMenuItem,
  ElIcon,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElDrawer,
  ElCard,
  ElSpace,
  ElColorPicker,
  ElTooltip,
} from 'element-plus'

export default (app) => {
  // 全局配置
  app.config.globalProperties.$ELEMENT = { size: themeSize, zIndex: 3000 }
  // 按需引用组件
  app.use(ElScrollbar)
  app.use(ElContainer)
  app.use(ElAside)
  app.use(ElHeader)
  app.use(ElMain)
  app.use(ElFooter)
  app.use(ElRow)
  app.use(ElCol)
  app.use(ElForm)
  app.use(ElFormItem)
  app.use(ElInput)
  app.use(ElButton)
  app.use(ElRadio)
  app.use(ElRadioGroup)
  app.use(ElMenu)
  app.use(ElSubmenu)
  app.use(ElMenuItem)
  app.use(ElIcon)
  app.use(ElDropdown)
  app.use(ElDropdownItem)
  app.use(ElDropdownMenu)
  app.use(ElDrawer)
  app.use(ElCard)
  app.use(ElSpace)
  app.use(ElColorPicker)
  app.use(ElTooltip)
}
